/*
 * UnparsedQuery.java
 *
 * Created on August 13, 2007, 9:58 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.adl.registry.website.lucene;

import java.util.ArrayList;

/**
 *
 * @author marksj
 */
public abstract class Query
{
    private ArrayList<QueryElement> mQueryElements;
    
    /** Creates a new instance of UnparsedQuery */
    protected Query()
    {
       this.mQueryElements = new ArrayList<QueryElement>();
    }
    
    protected ArrayList<QueryElement> getQueryElements()
    {
        return this.mQueryElements;
    }
    
    public void addElement(QueryElement element)
    {
        this.mQueryElements.add(element);
    }
    
    public void removeElement(QueryElement element)
    {
        if (element == null)
        {
            //TODO: throw exception
        }
        
        this.mQueryElements.remove(element);
    }
}
